<?php

class Application_Form_Banner extends Zend_Form
{
    public function init()
    {
        $this->setName('Banner');

        $banner_id = new Zend_Form_Element_Hidden('banner_id');
        $banner_id->addFilter('Int');

        $name = new Zend_Form_Element_Text('name');
        $name->setLabel('name')
              ->setRequired(true)
              ->addFilter('StripTags')
              ->addFilter('StringTrim')
              ->addValidator('NotEmpty');
              
        $text = new Zend_Form_Element_Text('text');
        $text->setLabel('text')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
        $num_clicks = new Zend_Form_Element_Text('num_clicks');
        $num_clicks->setLabel('num_clicks')
                             ->addFilter('Int');
               
        $created_date = new Zend_Form_Element_Text('created_date');
        $created_date->setLabel('created_date')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
        $start_date = new Zend_Form_Element_Text('start_date');
        $start_date->setLabel('start_date')
        		->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        					  
       $expired_date = new Zend_Form_Element_Text('expired_date');
       $expired_date->setLabel('expired_date')
        		->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        					  
        $client_id = new Zend_Form_Element_Text('client_id');
        $client_id->setLabel('client_id')
        					  ->addFilter('Int');
        					  
        $code = new Zend_Form_Element_Text('code');
        $code->setLabel('code')
        		->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        					  
        $click_url = new Zend_Form_Element_Text('click_url');
        $click_url->setLabel('click_url')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
        $target = new Zend_Form_Element_Text('target');
        $target->setLabel('target')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
        $format = new Zend_Form_Element_Text('format');
        $format->setLabel('format')
        	   ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        					  
       	$image_url = new Zend_Form_Element_Text('image_url');
        $image_url->setLabel('image_url')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        $ordering = new Zend_Form_Element_Text('ordering');
        $ordering->setLabel('ordering')
                              ->addFilter('Int');
                              
        $mode = new Zend_Form_Element_Text('mode');
        $mode->setLabel('mode')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
		$timeout = new Zend_Form_Element_Text('timeout');
        $timeout->setLabel('timeout')
               				  ->addFilter('Int');
               				  
        $status = new Zend_Form_Element_Text('status');
        $status->setLabel('status')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');

        $this->addElements(array($banner_id, $name, $text, $num_clicks,$created_date,$start_date,$expired_date,$client_id,$code,$click_url,$target,$format,$image_url, $ordering,$mode,$timeout,$status,$submit));
    }
}